<?php
/**
 * 易优CMS
 * ============================================================================
 * 版权所有 2016-2028 海南赞赞网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.eyoucms.com
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
 * ============================================================================
 * Author: 陈风任 <491085389@qq.com>
 * Date: 2019-7-30
 */

namespace app\home\controller;

use think\Db;
use think\Config;
use app\home\logic\AskLogic;

class MoreText extends Base
{
    public $users = [
        'users_id' => 0,
        'admin_id' => 0,
        'nickname' => '游客',
    ];
    public $users_id = 0;
    public $nickname = '游客';
    public $parent_id = -1;
    public $users_money = 0;
    public $AskModel;

    public function _initialize()
    {
        parent::_initialize();

        /* END */
    }

    // 问答首页
    public function index($tid)
    {



        $fields = "a.*, b.content ,b.content_ey_m";
        $res = Db::name('archives')
            ->field($fields)
            ->alias('a')
            ->join('__MORETEXT_CONTENT__ b', 'a.aid = b.aid', 'LEFT')
            ->where([
                'is_del' => 0,
                'typeid' => $tid
            ])->order('id','desc')
            ->select();
        $width = isMobile() ? 100 : 50;
        $this->assign('width', $width);
        $this->assign('article', $res);
        return $this->fetch(':lists_moretext');
    }


}